<?php
/*
 * Creative Bulletin Board Generation 3
 * Version 1.0 Beta 1
 +------------------------------------
 * Login Application (Auth), Logout Module (Backend)
 * Started: 4 October, 2009 3:32 PM
 * Script version: 1.0
 +------------------------------------
 */

class module implements module_interface{
	public function returninitvars(){
		global $lang;
		$this->info["page_title"] = $lang->getByKey("user.logout");
		$this->info["page_description"] = "";
		$this->info["module_version"] = "1.0";
		return $this->info;
	}

	public function construct(){ # call our initialize functions
		if(isset($_SESSION["cf_admin_username"])){
			unset($_SESSION["cf_admin_username"]);
		}
		else @header("Location: admin.php");
	}
	
	public function run(){
		global $view, $lang;
		$view->writeIn( $view->inlineSuccess($lang->getByKey("user.logout.success"), "admin.php") );
	}

	public function destruct(){}
}
